import 'package:flutter_test/flutter_test.dart';
import 'package:my_flutter_stomp_core/my_flutter_stomp_core.dart';
import 'package:my_flutter_stomp_core/my_flutter_stomp_core_platform_interface.dart';
import 'package:my_flutter_stomp_core/my_flutter_stomp_core_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMyFlutterStompCorePlatform
    with MockPlatformInterfaceMixin
    implements MyFlutterStompCorePlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final MyFlutterStompCorePlatform initialPlatform = MyFlutterStompCorePlatform.instance;

  test('$MethodChannelMyFlutterStompCore is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMyFlutterStompCore>());
  });

  test('getPlatformVersion', () async {
    MyFlutterStompCore myFlutterStompCorePlugin = MyFlutterStompCore();
    MockMyFlutterStompCorePlatform fakePlatform = MockMyFlutterStompCorePlatform();
    MyFlutterStompCorePlatform.instance = fakePlatform;

    expect(await myFlutterStompCorePlugin.getPlatformVersion(), '42');
  });
}
